﻿using GiaSu.Bussiness.Business;
using GiaSu.DataAccess.DataContext;
using GiaSu.DataAccess.Entity;
using System;
using System.Collections.Generic;
using System.Data.Entity.Validation;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DemoEntity
{
    using GiaSu.Business.Business.Implement;
    using GiaSu.DataAccess.Repository;

    class Program
    {
        static void Main(string[] args)
        {
            DataContext dataContext = new DataContext();
            IUnitOfWork unitOfWork = new UnitOfWork(dataContext);
            IGenericRepository<Parent> genericRepository = new GenericRepository<Parent>(dataContext);
            IParentBusiness parentBusiness = new ParentBusinessImpl(genericRepository,unitOfWork);
            parentBusiness.Add(new Parent
                                   {
                                       Name = "TTT",SubjectId = 1,GradeId = 1
                                   });
        }
    }
}
